package com.codefish.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.codefish.entity.PerInformationEntity;
import com.codefish.entity.SysBaseCommonEntity;
import com.codefish.util.R;

import java.util.Map;

/**
 * @Classname PerInformationService
 * @Description 用户管理
 * @Date 2021/4/29 15:07
 * @Created 学兔斯基眯眼看世界
 */
public interface PerInformationService extends IService<PerInformationEntity> {

    /**
     * 分页条件查询
     * @param name
     * @param page
     * @param size
     * @return
     */
    IPage<PerInformationEntity> getPageByParams(String name, int page, int size);

    /**
     * 根据 telephone 和 username 都要不重复
     * @param perInformationEntity
     * @return
     */
    boolean queryCountByTelephoneAndUsername(PerInformationEntity perInformationEntity);

    /**
     * 逻辑删除
     * @param id
     */
    boolean deleteOne(Long id);

    /**
     * 发送短信
     * @param phone
     */
    R sendSms(String phone);

    /**
     * 用户注册
     * @param perInformationEntity
     * @param smsCode
     * @return
     */
    R registrationUser(PerInformationEntity perInformationEntity, String smsCode);
}
